package com.jay.controller;

import com.jay.service.BindService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.util.HashMap;
import java.util.Map;


/**
 * Created by caoyuan7 on 2018/3/19.
 */
@RestController
@RequestMapping(value="/")
public class DemoController {
    @Autowired
    private BindService bindService;


    @RequestMapping(value="")
    public String getDemo(String app) throws Exception{
        if(StringUtils.isEmpty(app)){
            return "请传参，参数名称app请填写EXT_WEB1或者EXT_WEB2";
        }
        return bindService.getResponse(app);
    }
}
